package com.atguigu.spzx.cloud.user.service.impl;
import com.atguigu.spzx.cloud.user.entity.User;
import com.atguigu.spzx.cloud.user.mapper.UserMapper;
import com.atguigu.spzx.cloud.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper ;
    @Value("${server.port}")
    private int port;
    @Override
    public User findUserByUserId(Long userId) {
        User user = userMapper.findUserByUserId(userId);
        user.setUserName(user.getUserName()+":"+port);
        return user;
    }
}